package com.hzncc.flowable_diboot.vo;

import com.diboot.core.binding.annotation.BindDict;
import com.diboot.core.binding.annotation.BindField;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.entity.Customer;
import com.hzncc.flowable_diboot.entity.PersonChangeRecord;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
/**
* 负责人变更记录 VO定义
* @author MyName
* @version 1.0
* @date 2024-07-02
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class PersonChangeRecordListVO extends PersonChangeRecord  {
private static final long serialVersionUID = 1961839833439477717L;
    /**
    * 客户id 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "name",
        condition = "this.customer_id = id"
     )
    private String customerIdLabel;

    /**
    * 变更操作人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.operator = id"
     )
    private String operatorLabel;

    /**
    * 原负责人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.origin = id"
     )
    private String originLabel;

    /**
    * 新负责人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.target = id"
     )
    private String targetLabel;

    /**
    * 操作 关联字典选项
    */
    @BindDict(
    type = "CHANGE_OPER",
    field = "oper"
    )
    private LabelValue operLabel;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}